#include<stdio.h>
int main()
{
	int a;
	scanf("%d",&a);
	if(a/1000==(a%10)*10+(a%100)/10)
	{
	printf("It is a palindrome\n");
	}	
	else
	printf("It is not a palindrome\n");
	return 0;
}
